Skip to content

feat: make check for updates menu item dynamic (!waiting for upstream!)#1124

Draft
nmggithub wants to merge 1 commit intopingdotgg:mainfrom
nmggithub:make-update-menu-item-dynamic
Draft

feat: make check for updates menu item dynamic (!waiting for upstream!)#1124
nmggithub wants to merge 1 commit intopingdotgg:mainfrom
nmggithub:make-update-menu-item-dynamic

Conversation

@nmggithub
Copy link
Contributor

@nmggithub nmggithub commented Mar 15, 2026

What Changed

This PR cannot be merged in its current state as it depends on features not in upstream Electron yet, but I hope for that to change in the near future. Refs: electron/electron#50266

Once Electron truly supports it, this will allow us to change the label of the "Checking for Updates..." menu item on the fly.

Why

This provides a much better user experience by giving visual indications of what is happening during the update process.

UI Changes

To be added later, when this actually works.

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes

Note

Make 'Check for Updates' menu item label and enabled state dynamic based on update status

  • Introduces a shared checkForUpdatesMenuItem in main.ts reused across the macOS app menu and Help menu, replacing two separate inline definitions.
  • Adds an updateStateListeners registry so setUpdateState notifies all listeners on every update, including one that updates the menu item's label and enabled state based on the current update status.
  • Behavioral Change: setUpdateState now iterates over listeners rather than calling emitUpdateState() directly; both behaviors are preserved, but new listeners can now be registered without modifying setUpdateState.

Macroscope summarized fd1c6ae.

@coderabbitai
Copy link

coderabbitai bot commented Mar 15, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 499ce681-041d-45e2-a15f-da73a13f4d35

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions bot added size:M 30-99 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. labels Mar 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant